class Big {
    public int a;
    public int b;
}
class Small extends Big {
    public int c;
    public int d;
    public int a;
    public void func1() {
        super.a = 1;
        b = 2;
        System.out.println(a);//0
        System.out.println(super.a);//1
    }
    public void func2() {
        a = 1;//当父类和子类变量名（以及类型）相同时，优先访问子类自己
        b = 2;
        System.out.println(a);//1
        System.out.println(super.a);//0
    }
}


public class Test1 {
    public static void main(String[] args) {
        Small small = new Small();
        small.func2();
    }
}
